package com.hhkj.study.api.user.model.req;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.hhkj.study.admin.user.model.req.UserExerciseReq;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 提供给其他系统的请求参数
 * @Author luowu
 * @Date 2024/9/26 涵 14:22:30
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ApiCustomerUserExerciseSaveReq extends UserExerciseReq {

    @NotBlank(message = "手机号码不能为空")
    private String mobile;

    /**
     * 本次题目总数
     */
    private Integer currentTotalCount;

    @JsonProperty(value = "outsideBankType")
    @Override
    public Long getBankType() {
        return super.getBankType();
    }

    @JsonProperty(value = "outsideCourseId")
    @NotNull(message = "课程id不能为空")
    @Override
    public Long getCourseId() {
        return super.getCourseId();
    }

    @JsonProperty(value = "outsideOrderItemId")
    @NotNull(message = "子订单id不能为空")
    @Override
    public Long getOrderItemId() {
        return super.getOrderItemId();
    }

    @NotNull(message = "做题数量不能为空")
    @Override
    public Integer getExerciseCount() {
        return super.getExerciseCount();
    }

    @NotNull(message = "错题数量不能为空")
    @Override
    public Integer getCorrectCount() {
        return super.getCorrectCount();
    }

    @NotNull(message = "关联建培圈id不能为空")
    @Override
    public Long getAssoTrainId() {
        return super.getAssoTrainId();
    }

    @JsonProperty(value = "outsideBankId")
    @NotNull(message = "题库id不能为空")
    @Override
    public Long getBankId() {
        return super.getBankId();
    }
}
